<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<input type="button" name="getBut" id="getBut" value="get方式发送数据" />
		<div id="con"></div>
		
		<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
		<script type="text/javascript">
			/*
			$("#getBut").click(function(response,status,xhr){
				$("#con").load("demo.html");
			});
			*/
			
			/*
			$("#getBut").click(function(){
				$.get("demo.html",function(response,status,xhr){
					//alert(response);
					//$("#con").html(response);
					$("#con").append(response);
				});
			});
			*/
			
			/*	
			$("#getBut").click(function(){
				$.get("demo.php ? user=uzi&pwd=mdzz123",function(response,status,xhr){
					//alert(response);
					//$("#con").html(response);
					$("#con").append(response);
				});
			});
			*/
			
			/*
			$("#getBut").click(function(){
				$.get("demo.php", "user=uzi&pwd=mdzz123",function(response,status,xhr){
					//alert(response);
					//$("#con").html(response);
					$("#con").append(response);
				});
			});
			*/
			
			/*
			$("#getBut").click(function(){
				$.get("demo.php", {
					user:'uzi',
					pwd:'mdzz123'
				},function(response,status,xhr){
					$("#con").html(response);
				},'html');			
			});
			*/
			
			/*
			$("getBut").click(function(){
				$.get("demo.xml",function(response,status,xhr){
					//alert(response);
					$("#con").html(response);
					//$("#con").append(response);
				},'html');
			})
			*/
			
			/*
			$("getBut").click(function(){
				$.get("demo.xml",function(response,status,xhr){
					//alert(response);
					var user = $(response).find("root").find("user").text()
					var arr = user.split(":");
					alert(arr[0]);
				});
			});
			*/
			
			$("getBut").click(function(){
				$.getJSON("demo.JSON",function(response,status,xhr){
					//alert(response);
					for(var i = 0;i < 2;i ++){
						_user = response[i].user;
						_pwd = response[i].pwd;
						alert("用户名：" + _user + "密码：" + _pwd);
					}					
				},'html');
			});
			
			$("#getBut").click(functon(){
				$.getScript('demo.js',function(response,status,xhr){
					response;
				});
			});
		</script>	
	</body>
</html>

